﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AnguaRPGEngine.DND4eModule;
using AnguaRPGEngine.Library;

namespace TestingSandBox
{
    public partial class TestGenericControls : Form
    {
        private ListView _lvQandA;
        private List<QuestionAnswer> _qas;
        public TestGenericControls()
        {
            InitializeComponent();
        }

        private void TestGenericControls_Load(object sender, EventArgs e)
        {
            _qas = new List<QuestionAnswer>();
            _qas.Add(new QuestionAnswer("What's Happening?", "Nuffin"));

            ColumnHeader column1 = new ColumnHeader();
            column1.Text = "Question";
            column1.Width = 200;
            column1.Name = "QuestionColumn";
            ColumnHeader column2 = new ColumnHeader();
            column2.Text = "Answer";
            column2.Width = 200;
            column2.Name = "AnswerColumn";
            ListView.ListViewItemCollection items = new ListView.ListViewItemCollection(genericListControl1.ListView);
            foreach (QuestionAnswer qa in _qas)
            {
                items.Add(qa.Question).SubItems.Add(qa.Answer);
            }
            ListView.ColumnHeaderCollection columns = new ListView.ColumnHeaderCollection(genericListControl1.ListView);
            columns.Add(column1);
            columns.Add(column2);
           
           // genericListControl1.Initialize(columns, items);
        }
    }
}
